<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Guestbook</title>
	<link rel="stylesheet" href="/static/main.css" type="text/css">
</head>
<body>
	<div id="main">
		<h1>留言本</h1>
	<div id="form-area">
		<p>Please comment here:</p>
		<form action="/post" method="post">
		<table>
			<tr>
				<th>姓名：</th>
				<td><input type="text" name="name"></td>
			</tr>
				<tr><th>评论：</th>
				<td><textarea rows="5" cols="40" name="comments"></textarea></td>
			</tr>
		</table>
		<p><input type="submit" value="提交"></p>
		</form>
	</div>
	<div id="entries-area">
		<h2>历史留言记录</h2>
		<div class="entry">
			{% for greeting in greeting_list %}
			<h3>{{ greeting.name }}
				commented at {{ greeting.create_at|datetime_fmt }}:</h3>
			<p>{{ greeting.comment|nl2br }}</p>
			{% endfor %}
		</div>
	</div>
	</div>
</body>
</html>
